#pragma once

extern "C" {
#include <libavcodec/avcodec.h>
}

bool support_hwdevice();
int init_ctx(const char *url, bool use_hw_decode);
void clear_ctx();
int ffmpeg_video_decode(const char *url, void (*frame_callback)(AVFrame *frame_bgr), bool use_hw_decode, bool only_key_frame);
